//
//  Common.swift
//  weibo
//
//  Created by 代伟佳 on 16/4/17.
//  Copyright © 2016年 代伟佳. All rights reserved.
//

import UIKit

// 微博登录的账号
let DWJweiboName = "18603297713"
let DWJweiboPasswd = "xin1314"

// 新浪微博需要的参数
let APPKEY = "65580150"
let APPSECRET = "c7b6a3ff2a606b075b2cc268b43ac9e0"
let REDIRECT_URI = "http://www.baidu.com"

// 屏幕的宽高
let kWIDTH = UIScreen.mainScreen().bounds.size.width
let kHEIGHT = UIScreen.mainScreen().bounds.size.height

// 主题颜色
let ThemeColor = UIColor.orangeColor()

// RGB
func RGB(red red:CGFloat, green:CGFloat, blue: CGFloat) ->UIColor {

    return UIColor(red: red / 255, green: green / 255, blue: blue / 255, alpha: 1)
}

// 随机颜色
func RandomColor() -> UIColor{

    let r = random() % 256
    let g = random() % 256
    let b = random() % 256
    
    return RGB(red: CGFloat(r), green: CGFloat(g), blue: CGFloat(b))
}

